L1-067 洛希极限
题目 L1-067 洛希极限
思路分析
代码实现
#include<bits/stdc++.h>
using namespace std;
#define endl '\n'
using ll = long long;
using ull = unsigned long long;
using PII = pair<int,int>;
using Pll = pair<ll,ll>;
int dx[4]= {-1,0,1,0},dy[4]= {0,1,0,-1};
const int inf = 0x3f3f3f3f;
int main() {
ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
// 比值开3次方 * 大天体半径 * 2.455或1.26
double rab,shuxing,rdab;
cin>>rab>>shuxing>>rdab;
double beishu;
if(shuxing==0) {
beishu=2.455;
} else {
beishu=1.26;
}
double ans=rab*beishu;
if(ans>rdab) {
printf("%.2f T_T",ans);
} else {
printf("%.2f ^_^",ans);
}
return 0;
}
同类题型
视频讲解
⬅️ L1-066 猫是液体 🏠 00-天梯赛 ➡️ L1-068 调和平均
💬 评论